package com.wing.purchase.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.purchase.model.entity.PurReturnGoodsRecords;
import com.wing.purchase.model.response.PurReturnGoodRecordsSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 采购退货表-Dao
 *
 * @author
 */
@Mapper
public interface PurReturnGoodsRecordsDao extends BaseMapper<PurReturnGoodsRecords> {
    /**
     * 查询退货记录
     * @param pg
     * @param params
     * @return
     */
    List<PurReturnGoodRecordsSearchVo> list4app(@Param("page") Page<PurReturnGoodRecordsSearchVo> pg,@Param("params") Map<String, Object> params);

    /**
     * 获取退货数量
     * @param id
     * @param code
     * @return
     */
    BigDecimal getSendQuantityForLogistics(@Param("id") Long id,@Param("code") String code);
}
